package com.zcc.makingfriend.service.impl;

import com.zcc.makingfriend.dao.TbArticleCategory;
import com.zcc.makingfriend.mapper.TbArticleCategoryMapper;
import com.zcc.makingfriend.service.TbArticleCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zcc
 */
@Service
public class TbArticleCategoryServiceImpl implements TbArticleCategoryService {
    @Autowired
    TbArticleCategoryMapper tbArticleCategoryMapper;

    @Override
    public int addTbArticleCategory(TbArticleCategory tbArticleCategory) {
        return tbArticleCategoryMapper.addTbArticleCategory(tbArticleCategory);
    }

    @Override
    public int updateTbArticleCategory(TbArticleCategory tbArticleCategory) {
        return tbArticleCategoryMapper.updateTbArticleCategory(tbArticleCategory);
    }

    @Override
    public int deleteTbArticleCategoryByArticleId(String articleId) {
        return tbArticleCategoryMapper.deleteTbArticleCategoryByArticleId(articleId);
    }

    @Override
    public String getCategoryUuidByArticleUuid(String articleUuid) {
        return tbArticleCategoryMapper.getCategoryUuidByArticleUuid(articleUuid);
    }

    @Override
    public List<TbArticleCategory> findTbArticleCategoryByCategoryUuid(String categoryUuid, int page, int size) {
        return tbArticleCategoryMapper.findTbArticleCategoryByCategoryUuid(categoryUuid, page, size);
    }
}
